package com.qiaofang.entity;

import com.qiaofang.common.model.BaseDomain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

@Data
@Entity
@Table(name = "sys_tm_sms_history")
public class SmsHistory extends BaseDomain {

    /**
     *发送人
     */
    @ApiModelProperty("发送人")
    @Column(name = "sender")
    private String sender;
    /**
     *接收人
     */
    @ApiModelProperty("接收人")
    @Column(name = "receiver")
    private String receiver;
    /**
     *消息内容
     */
    @ApiModelProperty("发送内容")
    @Column(name = "content")
    private String content;
    /**
     *发送状态:[{key:send_status,values:[{no:0,alias:FAILURE,remark:失败},{no:1,alias:SUCCESS,remark:成功}]}]
     */
    @ApiModelProperty("发送状态")
    @Column(name = "send_status")
    private String sendStatus;
    /**
     * 短信发送回调结果
     */
    @ApiModelProperty("回调结果")
    @Column(name = "send_res")
    private String sendRes;
    /**
     * 短信重发原始发送Id
     */
    @ApiModelProperty("原始记录Id")
    @Column(name = "original_id")
    private Long originalId;
    /**
     * 短信重发次数
     */
    @ApiModelProperty("补发次数")
    @Column(name = "repeat_count")
    private String repeatCount;
    /**
     * 补发状态,同send_status
     * 状态值: 0,失败; 1,成功
     */
    @ApiModelProperty("补发状态")
    @Column(name = "repeat_status")
    private String repeatStatus;
    /**
     *商户号
     */
    @ApiModelProperty("商户Id")
    @Column(name = "merchant_id")
    private Long merchantId;

    /**
     *排序
     */
    @ApiModelProperty("排序")
    @Column(name = "sort")
    private String sort;
    /**
     *备注
     */
    @ApiModelProperty("备注")
    @Column(name = "remark")
    private String remark;
    /**
     *创建人
     */
    @ApiModelProperty("创建人")
    @Column(name = "create_user_id")
    private Long createUserId;
    /**
     *修改人
     */
    @ApiModelProperty("修改人")
    @Column(name = "update_user_id")
    private Long updateUserId;
    /**
     * 1：电话营销平台（本公司），2：第一信息
     */
    @ApiModelProperty("发送平台")
    @Column(name = "platform")
    private String platform;
    /**
     * 第三方的uuid
     */
    @ApiModelProperty("三方发送号")
    @Column(name = "order_uuid")
    private String orderUuid;
    /**
     * 原因
     */
    @ApiModelProperty("失败原因")
    @Column(name = "reason")
    private String reason;

    /***************额外扩展字段************/
    /**
     *公司名称
     */
    @Transient
    private String companyName;
    /**
     * 发送次数
     */
    @Transient
    private Long sendCount;

}
